The present invention relates to an image processing method and apparatus and, more particularly, to an image processing method and apparatus which obtain multivalued interpolation data for interpolating multivalued image data.
Recent development in increasing resolution of an image output apparatus such as a printer has made it possible to print or display a high-quality image. To efficiently utilize the function of such image output apparatus having a high resolution, it is necessary to form image data corresponding to the resolution of the output apparatus. A page description language such as PostScript is well known as descriptive method expressing graphic image data having a high resolution. Such description language describes text or graphic information on one page in a form which does not depend on the resolution of the image output apparatus. When output to the image output apparatus, bit map data of a resolution corresponding to the resolution of the image output apparatus to be used is generated based on the page description language.
On the other hand, when image data is in the form of bit map data originally (e.g., sampling image data read by a scanner), resolution conversion is complicated. For example, when the image data of a resolution of 200 dpi (dot/inch) is output to of printer having resolution of 400 dpi to obtain the image in the same size as the original image, the image data is subjected to an interpolation processing to convert the image data into new data whose pixel number in width and length is twice as large as in the original image data. This interpolation processing is dependent on whether the image data is binary or multivalued.
Hereinafter, the conventional interpolation processing to binary image data and multivalued image data are described.
FIGS. 9A and 9B are diagrams to explain an example of binary data interpolation.
In FIG. 9A, X.sub.1, X.sub.2, . . . X.sub.6 are pixel data to be obtained by the interpolation processing. The binary data on the upper and lower lines are pixel data existing before the interpolation processing. In the example, since the pixel data above and below the pixels X.sub.1 and X.sub.2, and X.sub.5 and X.sub.6 are respectively the same, the pixel data to be interpolated can be easily determined. That is, X.sub.1 =X.sub.2 =0, and X.sub.5 =X.sub.6 =1. On the other hand, since the pixel data on the pixels above X.sub.3 and X.sub.4 differ from the pixel data below the pixels X.sub.3 and X.sub.4 the corresponding, interpolation values cannot be determined simply by the pixel data. With the pixel datum to be interpolated (hereinafter, referred to as a "pixel of interest") as center, the five pixels respectively included in the next adjacent upper line and lower line are referred to as "reference pixels". For example, in the case of the pixel of interest X.sub.3, the reference pixels of the upper line are "0, 0, 0, 0, 1, 1", and those of the lower line are "0, 0, 1, 1, 1, 1". As shown in FIG. 9A, since the pixel data change from "0" to "1" between the fourth and fifth pixels from the upper left, and the pixel data from "0" to "1" between the second and third pixels from the lower left, the interpolation value of the pixel of interest X.sub.3 is determined as "0".
In the case of the pixel of interest X.sub.4, since each of the changing points 0.fwdarw.1 in the reference pixels of the upper and lower lines is one pixel shifted from the changing point of the pixel of interest X.sub.3, the interpolation value X.sub.4 is determined as "1". Accordingly, the pixel data after the interpolation processing is as FIG. 9B showing that the edge in the slant direction is smoothed to correspond to the resolution.
The interpolation processing in the case of multivalued image data is described below. FIGS. 10A-10C are diagrams to explain the method of obtaining the pixel of interest X to be interpolated. FIG. 10A shows the case where a pixel value of the proceeding line which is located just above the pixel of interest X is used as an interpolation value. FIG. 10B shows the case where two pixel values located above and under the pixel of interest X are averaged as an interpolation value. FIG. 10C shows the case where six pixels of the upper and lower lines are subject to a weighted averaging to obtain an interpolation value.
FIGS. 11 and 12 are diagrams for explaining the conventional interpolation of multivalued image data. FIG. 12 particularly shows the case where interpolated pixel data X.sub.1, X.sub.2 of FIG. 11 are obtained in accordance with the interpolation processing of FIGS. 10A-10C. When the interpolation processing of FIG. 10A is applied, the (interpolation) pixel data X.sub.1 and X.sub.2 are determined by the data above the pixel data X.sub.1 and X.sub.2 of the proceeding (upper) line, that is, X.sub.1 =70, X.sub.2 =80. When the interpolation processing of FIG. 10B is applied, X.sub.1 =(70+170)/2=120 and X.sub.2 =(80+180)/2=130. Furthermore, when the interpolation processing of FIG. 10C is applied, X.sub.1 =(70+80+80+180)/8+(70+170)/4=51+60=111, and X.sub.2 =(70+170+170+180)/8+(80+180)/4=74+65=139.
As expected from the content of the interpolation processing in the case of the above-described binary image data, a large difference between the interpolation values X.sub.1 and X.sub.2 of the multivalued data may exist; however, such difference does not exist when the weighting is varied.
Accordingly, in the conventional interpolation processing of the multivalued image data, if an image edge exists in the reference pixels, since it will not be reflected in the interpolated pixels, the multivalued data obtained by the interpolation become dull and faded. Furthermore, if the method used for the conventional binary image data interpolation processing is applied to the multivalued image data interpolation processing, the hardware becomes large, and problems may arise in increase of the apparatus size and cost.